FMPD AP algorithm